<%
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
include("/pages/template/head.html"){}
%>
<script type="text/javascript">
    var oper = {
        setCredit:function(id){
            if(!validForm()) {
                return false;
            }
            id = id || '0';
            var url = 'system/customerinfo/setCredit/'+id;
            form1.action = url;
            form1.submit();
            return true;
        }
    };

</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal"
	  role="form" >
	<input type="hidden" name="customerId" value="${customerId!""}" />
	<input type="hidden" name="customerName" value="${customerName!""}" />

	<table class="table">
		<% // 列表头部 %>
		<tr>
			<td>信用额度</td>
			<td>
				<input class="form-control" type="text" name="creditAmount"
					   value="${model.creditAmount}"  validname="信用额度" />
			</td>
		</tr>
		<tr>
			<td>预警额度</td>
			<td>
				<input class="form-control" type="text" name="warnAmount"
					   value="${model.warnAmount}" validname="预警额度"  />
			</td>
		</tr>
		<tr>
			<td>备注</td>
			<td>
				<textarea  valid="vtext"  class="form-control" rows="3" cols="30" name="remark">${model.remark}</textarea>
			</td>
		</tr>
	</table>

	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
		<div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
			<button class="btn btn-primary" onclick="oper.setCredit('${customerId}');return false;">授 信</button>
			<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
		</div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>